package com.runner.player;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.runner.entity.CollisionEntity;
import com.runner.observer.Subject;
import com.runner.player.input.RingerInputComponent;
import com.runner.player.state.NormalState;
import com.runner.utility.Locator;

public class Ringer extends Player{

	public static final float RINGER_JUMP_VEL =150f * RELATIVE_SPEED;
	

	public Ringer(Vector2 pos, Subject subject) {
		super(pos, TYPE.PLAYER, RINGER_PATH, SCALE, subject);
		input=new RingerInputComponent(this);
		state=new NormalState(this);
		jumpSprite=new Sprite(Locator.getAssets().get(RINGER_JUMP_PATH, Texture.class));
		slideSprite=new Sprite(Locator.getAssets().get(RINGER_SLIDE_PATH, Texture.class));
		runSprite=this.getSprite();
		
	}

	@Override
	public void collide(CollisionEntity otherBody) {
		super.collide(otherBody);
		state.collide(otherBody);
	}
	
	public Vector2 getJumpVelocity(){
		return new Vector2(0,RINGER_JUMP_VEL * Locator.getYGameSpeed());
	}
	
	public PLAYER_TYPE getPlayerType() {
		return PLAYER_TYPE.RINGER;
	}
	
	public float getJumpGravityScale(){
		return 1f;
	}
	
	public float getJumpTimer() {
		return 0.28f;
	}
	
	

}
